#include <cstdint>
#include <iostream>
#include <vector>

using namespace std;
using ll = int64_t;

static inline constexpr ll MOD = 1e9+7;

static inline constexpr ll fpow(ll b, ll e, ll MOD) {
    ll res = 1;
    while (e > 0) {
        if (e & 1) res = (res * b) % MOD;
        b = (b * b) % MOD;
        e >>= 1;
    }
    return res;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    ll n;
    cin >> n;
    vector<ll> p(n);
    for (ll i = 0; i < n; i++) {
        cin >> p[i];
    }

    constexpr ll inv1000 = fpow(1000, MOD - 2, MOD);
    vector<ll> p0(n), p1(n);
    for (ll i = 0; i < n; i++) {
        p1[i] = (ll)p[i] * inv1000 % MOD;
        p0[i] = (1000 - p[i]) * inv1000 % MOD;
    }

    ll e1 = 0;
    for (ll i = 0; i < n; i++) {
        e1 = (e1 + p1[i]) % MOD;
    }

    ll emax = 0;
    for (ll k = 1; k <= n; k++) {
        vector<ll> dp(2 * n + 10, 0);
        ll minidx = n;
        ll maxidx = n;
        dp[n] = 1;

        for (ll i = 0; i < n; i++) {
            vector<ll> ndp(2 * n + 10, 0);
            ll nmin = 2 * n + 9;
            ll nmax = -1;

            for (ll idx = minidx; idx <= maxidx; idx++) {
                if (dp[idx] == 0) continue;
                ll val = dp[idx];
                ll j = idx - n;

                if (j + 1 < k) {
                    ll idx1 = idx + 1;
                    ndp[idx1] = (ndp[idx1] + val * p0[i]) % MOD;
                    if (idx1 < nmin) nmin = idx1;
                    if (idx1 > nmax) nmax = idx1;
                }

                ll idx2 = idx - 1;
                ndp[idx2] = (ndp[idx2] + val * p1[i]) % MOD;
                if (idx2 < nmin) nmin = idx2;
                if (idx2 > nmax) nmax = idx2;
            }

            minidx = nmin;
            maxidx = nmax;
            dp = std::move(ndp);
        }

        ll s = 0;
        for (ll idx = minidx; idx <= maxidx; idx++) {
            s = (s + dp[idx]) % MOD;
        }
        ll pk = (1 - s + MOD) % MOD;
        emax = (emax + pk) % MOD;
    }

    ll ans = (e1 + emax) % MOD;
    cout << ans << endl;

    return 0;
}